@using Seal.Model;
@{
    ReportViewTemplate Template = Model;
    Template.Description = "Root view containing all the code necessary for the report execution.";

    //Shared template
    Template.SharedPartialTemplates = new string[] { "Restrictions.iShared" };

    //Parameters for this template
    Template.Parameters.Add(new Parameter() { Name = Parameter.ReportFormatParameter, 
        Value = "html", 
                Enums = new string[] { },
                EnumType = typeof(ReportFormat),
                DisplayName = "Report format",
                Description = "Format of the report result.",
                UseOnlyEnumValues = true
            });
    Template.Parameters.Add(new Parameter() { Name = "report_description", DisplayName = "Report description", Description = "Optional report description displayed in the information panel." });
    Template.Parameters.Add(new Parameter() { Name = "restriction_button", DisplayName = "Display: Show restrictions", BoolValue = true, Description = "If true, the restrictions are displayed when the report is initialized (if the report has prompted restrictions)." });
    Template.Parameters.Add(new Parameter() { Name = "information_mode", DisplayName = "Display: Information messages", Description = "Defines if the information messages panel is enabled and if it is shown when the report is initialized.", Value = "enabled", Enums = new string[] { "enabled|Information panel enabled", "enabledshown|Information panel enabled and shown", "disabled|Information panel hidden" } });
    Template.Parameters.Add(new Parameter() { Name = "messages_mode", DisplayName = "Display: Execution messages", Description = "Defines if the execution messages panel is enabled and if it is shown when the report is initialized or executed.", Value = "enabled", Enums = new string[] { "enabled|Messages panel enabled", "enabledshown|Messages panel enabled and shown", "enabledshownexec|Messages panel enabled and shown only during execution", "disabled|Messages panel hidden" } });
    Template.Parameters.Add(new Parameter() { Name = Parameter.AutoScrollParameter, DisplayName = "Display: Autoscroll enabled for execution messages", BoolValue = true, Description = "If true, the top of the messages is always displayed."});
    Template.Parameters.Add(new Parameter() { Name = "execute_button", DisplayName = "Display: Show Execute button", BoolValue = true, Description = "If true, the Execute button is shown. The button could be hidden if restrictions trigger report execution." });
    Template.Parameters.Add(new Parameter() { Name = "restrictions_position", DisplayName = "Restrictions: Panel position", Value = "top", Enums = new string[] { "top|Top", "left|Left", "right|Right" }, Description = "The position of the restrictions panel (default is on the top). For Left or Right position, set 'Number of restrictions per row' to 1 to force a line break." });
    Template.Parameters.Add(new Parameter() { Name = "restrictions_width", DisplayName = "Restrictions: Panel width", NumericValue = 3, Description = "If restrictions have a on Left or Right position, the width of the panel between 1 and 11 on 12 spans (default is 3)." });
    Template.Parameters.Add(new Parameter() { Name = "restrictions_per_row", DisplayName = "Restrictions: Number of restrictions per row", NumericValue = 4, Description = "Defines the number of prompted restrictions to be displayed per row (between 1 and 12). Set this value to 1 for Left or Right panel position." });
    Template.Parameters.Add(new Parameter() { Name = "restrictions_select_size", Value = "auto", DisplayName = "Restrictions: Select size", Description = "Number of items shown in the enumerated list restriction popups.", Enums = new string[] { "auto", "4", "5", "10" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "restrictions_header", DisplayName = "Restrictions: Header", Description = "Additional HTML added before the restrictions.", Enums = new string[] { "", "<h4>Please enter restriction values</h4>" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "restrictions_footer", DisplayName = "Restrictions: Footer", Description = "Additional HTML added after the restrictions.", Enums = new string[] { "", "<p>Execute this report to view the result expected...</p>" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = Parameter.DrillEnabledParameter, DisplayName = "Navigation: Drill Enabled", BoolValue = true, Description = "If true, the Drill navigation is enabled." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.DrillAllParameter, DisplayName = "Navigation: Drill all elements of the hierarchy", BoolValue = true, Description = "If true, the Drill navigation is applied to all elements involved in the hierarchy (e.g. 'Day' is replaced by 'Month' and 'Month' by 'Year' in the same model). If several parents or children can be chosen, the one with the smallest display order is taken." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.SubReportsEnabledParameter, DisplayName = "Navigation: Sub-Reports Enabled", BoolValue = true, Description = "If true, the Sub-Reports navigation is enabled." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.ForceExecutionParameter, DisplayName = "Options: Force execution", BoolValue = false, Description = "If true, force the report to be executed directly the first time even if some restrictions are prompted." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.ServerPaginationParameter, DisplayName = "Options: Server pagination enabled", BoolValue = true, Description = "If true, data used by HTML data tables pagination are stored on the server." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.EnableResultsMenuParameter, DisplayName = "Options: Enable Results menu", BoolValue = true, Description = "If false, the Result menu to export a report result is not available." });
    Template.Parameters.Add(new Parameter() { Name = "refresh_rate", DisplayName = "Options: Auto-Refresh (seconds)", NumericValue = 0, Description = "Value in seconds to re-execute automatically the report. 0 means no refresh." });
    Template.Parameters.Add(new Parameter() { Name = Parameter.ForceModelsLoad, DisplayName = "Options: Load all Models", BoolValue = false, Description = "If true, all models defined in the report will be loaded and processed during execution. By default, false means to load only models belonging to the Views being parsed." });
    Template.Parameters.Add(new Parameter() { Name = "additional_js", DisplayName = "Additional JavaScript", Description = "Additional JavaScript inserted at the top of the report result file." });
    Template.Parameters.Add(new Parameter() { Name = "additional_css", DisplayName = "Additional CSS", Description = "Additional CSS inserted at the top of the report result file (after the CSS includes).", Enums = new string[] { "body {font-size: 12px;}", ".dataTable {font-size: 10px;}" }, UseOnlyEnumValues = false });
    Template.Parameters.Add(new Parameter() { Name = "container_fluid", BoolValue = true, DisplayName = "Bootstrap: Containers are fluid", Description = "If true, the bootstrap containers have a full width, spanning the entire width of the viewport, otherwise the containers have a responsive fixed width." });
    Template.Parameters.Add(new Parameter() { Name = "print_body_width", Value = "1200px", DisplayName = "HTML Print: Body width", Description = "The width of the body HTML element in HTML Print format. The HTML Print format is also used for PDF rendering (HTML to PDF, Chart and Gauge images)." });
    Template.Parameters.Add(new Parameter() { Name = "print_information", DisplayName = "HTML Print: Show report information", BoolValue = true, Description = "If true, report information is displayed at the end of the document." });
    Template.Parameters.Add(new Parameter() { Name = "print_messages", DisplayName = "HTML Print: Show messages", BoolValue = false, Description = "If true, report execution messages are displayed at the end of the document." });

    //Allowed template parent names
    Template.ParentNames = new List<string>();
}